<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>事件访问修饰符</title>
		<style >
			.redClass{
				width: 800px;
				height: 400px;
				background-color: red;
			}
			.blueClass{
				width: 300;
				height: 200;
				background-color: blue;
			}
		</style>
	</head>
	<body>
		<div id="app">
			<a href="https://www.baidu.com">百度</a>
			<a v-bind:href="url">百度</a>
			<a :href="url">百度</a>
			<div :class="{redClass: flag}"></div>
			<button @click="flag = !flag">切换样式</button>
		    <div :class="myClass"></div>
		</div>
		
		<script src="https://cdn.jsdelivr.net/npm/vue@2"></script>
		<script>
			const app = new Vue({
				el:'#app',
				data: {
					url:'http://www.baidu.com',
					flag: true,
					myClass: 'blueClass'
				},
				//定义vue对象中的方法
				methods: {
					
				}
			})
		</script>
		
	</body>
</html>